﻿@model SearchController.IndexModel

<h2>Search</h2>
<div class="searchBody">
    @using (Html.BeginForm("Index", "Search", FormMethod.Post))
    {
        <div>
            <label for="txtQueryText">Search query:</label>
            @Html.TextBoxFor(m => m.QueryText, new {id = "txtQueryText", style = "width:500px;"})
            <input type="submit" value="Search">
        </div>
        <div>
            <h3>Results:</h3>
            @{
                foreach (var result in Model.Results)
                {
                    <div>@Html.ActionArticleLink(result.Title, result.Slug)</div>
                }
            }
        </div>
    }
</div>